// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueRouter from "vue-router"
// import vue from '../../js-router/vue'
// import vueRouter from '../../js-router/vue-router'

import App from './App'
// import router from './router'

import Home from './components/Home'
import Page1 from './components/Page1'
import Page2 from './components/page2'

Vue.use(VueRouter)

Vue.config.productionTip = false

/* eslint-disable no-new */

const routes = [
  {
    path: "/home",
    component: Home,
    name: 'Home',
    children: [
      {path: 'page1', component: Page1, name: 'Page1'},
      {path: 'page2', component: Page2, name: 'Page2'}
    ]
  },
  {
    path: '*',
    redirect: {name: 'Home'}
  }
];

const router = new VueRouter({
  routes
});


new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
